﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf.basic.icon {
    import flash.display.*;
    import flash.geom.*;
    import org.aswing.*;
    import org.aswing.plaf.*;
    import org.aswing.graphics.*;

    public class SolidArrowIcon implements Icon, UIResource {

        protected var shape:Shape;
        protected var width:Number;
        protected var height:Number;
        protected var arrow:Number;

        public function SolidArrowIcon(_arg1:Number, _arg2:Number, _arg3:ASColor){
            this.arrow = _arg1;
            this.width = _arg2;
            this.height = _arg2;
            this.shape = new Shape();
            this.paintIconWithColor(_arg3);
        }
        public function updateIcon(_arg1:Component, _arg2:Graphics2D, _arg3:int, _arg4:int):void{
            this.shape.x = _arg3;
            this.shape.y = _arg4;
        }
        public function paintIconWithColor(_arg1:ASColor):void{
            var _local2:int;
            var _local3:int;
            this.shape.graphics.clear();
            var _local4:Graphics2D = new Graphics2D(this.shape.graphics);
            var _local5:Point = new Point((_local2 + (this.width / 2)), (_local3 + (this.height / 2)));
            var _local6:Number = this.width;
            var _local7:Array = new Array();
            _local7.push(this.nextPoint(_local5, this.arrow, ((_local6 / 2) / 2)));
            var _local8:Point = this.nextPoint(_local5, (this.arrow + Math.PI), ((_local6 / 2) / 2));
            _local7.push(this.nextPoint(_local8, (this.arrow - (Math.PI / 2)), (_local6 / 2)));
            _local7.push(this.nextPoint(_local8, (this.arrow + (Math.PI / 2)), (_local6 / 2)));
            _local4.fillPolygon(new SolidBrush(_arg1), _local7);
        }
        protected function nextPoint(_arg1:Point, _arg2:Number, _arg3:Number):Point{
            return (new Point((_arg1.x + (Math.cos(_arg2) * _arg3)), (_arg1.y + (Math.sin(_arg2) * _arg3))));
        }
        public function getIconHeight(_arg1:Component):int{
            return (this.height);
        }
        public function getIconWidth(_arg1:Component):int{
            return (this.width);
        }
        public function setArrow(_arg1:Number):void{
            this.arrow = _arg1;
        }
        public function getDisplay(_arg1:Component):DisplayObject{
            return (this.shape);
        }

    }
}//package org.aswing.plaf.basic.icon 
